import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { LessonCode } from 'src/app/app-lesson-code';

@Component({
  selector: 'app-lesson5-one',
  templateUrl: './lesson5-one.component.html',
  styleUrls: ['./lesson5-one.component.scss']
})
export class Lesson5OneComponent implements OnInit {

  code  = LessonCode.lesson5code.lesson5codeOne;
  data = {
    user: '',
    password: '',
    rePassword: '',
    sex: '1'
  };
  constructor() { }

  ngOnInit() {
  }
  submit(form: NgForm) {
    const isValid = form.valid;
    alert(isValid);
  }
}
